using System;
using System.Runtime.InteropServices;

namespace Leap
{
	public class BugReport : Interface
	{
		private HandleRef swigCPtr;

		public bool IsActive => LeapPINVOKE.BugReport_IsActive_get(swigCPtr);

		public float Progress => LeapPINVOKE.BugReport_Progress_get(swigCPtr);

		public float Duration => LeapPINVOKE.BugReport_Duration_get(swigCPtr);

		public BugReport(IntPtr cPtr, bool cMemoryOwn)
			: base(LeapPINVOKE.BugReport_SWIGUpcast(cPtr), cMemoryOwn)
		{
			swigCPtr = new HandleRef(this, cPtr);
		}

		public static HandleRef getCPtr(BugReport obj)
		{
			return obj?.swigCPtr ?? new HandleRef(null, IntPtr.Zero);
		}

		~BugReport()
		{
			Dispose();
		}

		public override void Dispose()
		{
			lock (this)
			{
				if (swigCPtr.Handle != IntPtr.Zero)
				{
					if (base.swigCMemOwn)
					{
						base.swigCMemOwn = false;
						LeapPINVOKE.delete_BugReport(swigCPtr);
					}
					swigCPtr = new HandleRef(null, IntPtr.Zero);
				}
				GC.SuppressFinalize(this);
				base.Dispose();
			}
		}

		public BugReport()
			: this(LeapPINVOKE.new_BugReport(), true)
		{
		}

		public bool BeginRecording()
		{
			return LeapPINVOKE.BugReport_BeginRecording(swigCPtr);
		}

		public void EndRecording()
		{
			LeapPINVOKE.BugReport_EndRecording(swigCPtr);
		}
	}
}
